///////////////////////////////////////////////////////////
//  GameTimerMultimedia.h
//  Implementation of the Class GameTimerMultimedia
//  Created on:      11-Jan-2015 4:37:13 PM
//  Original author: Eng. Ahmed Yasser
///////////////////////////////////////////////////////////

#if !defined(EA_83B99176_74B2_4eba_94E6_E1C6BACEF73F__INCLUDED_)
#define EA_83B99176_74B2_4eba_94E6_E1C6BACEF73F__INCLUDED_

// include the windows file for timeGetTime function
#include <Windows.h>
#include "IGameTimer.h"

// Link with the multimedia library
#pragma comment(lib, "Winmm.lib")

namespace EngineGame
{
	namespace EngineUtilities
	{
		/**
		 * Implement the game timer using the mutimedia timer (using the function
		 * timeGetTime)
		 * @author Eng. Ahmed Yasser
		 * @version 1.0
		 * @updated 12-Jan-2015 12:01:54 PM
		 */
		class GameTimerMultimedia : public EngineGame::EngineUtilities::IGameTimer
		{

		private:

			/**
			 * The current clock time
			 */
			DWORD _currentTime;

		public:
			GameTimerMultimedia();
			virtual ~GameTimerMultimedia();
			GameTimerMultimedia(const GameTimerMultimedia& theGameTimerMultimedia);

			/**
			 * Returns the elapsed time from the last time startTimer called
			 */
			virtual double getElapsedTime();
			/**
			 * Initialize the timer with any pre-required operations
			 */
			virtual void initTimer();
			/**
			 * Start the timer of the game
			 */
			virtual void startTimer();

		};

	}

}
#endif // !defined(EA_83B99176_74B2_4eba_94E6_E1C6BACEF73F__INCLUDED_)
